package com.study.demo.gsbean.demo5;

import com.study.demo.gsbean.demo4.TestChangeMethod;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * 构造函数的选择 / 参数的转换
 *
 * @author: elvin
 * @time: 2019-01-23 09:58
 * @desc:
 **/
public class Start5 {
    public static void main(String[] args) {
        ApplicationContext bf = new ClassPathXmlApplicationContext("demo5/application.xml");
        User user = bf.getBean("user", User.class);
        System.out.println(user);

     /*   User user1 = bf.getBean("user1", User.class);
        System.out.println(user1);*/
    }

   /* public static void main(String[] args){
        Date date = new Date("2018/01/01 01:02:03");
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        System.out.println(format.format(date));
    }*/
}
